﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using SGRapidForm.Common;
using SGRapidForm.Permission.Entity;

namespace SGRapidForm.Permission.Service.Interface
{
    [ServiceContract(Namespace = "http://www.solutiongear.net/SGRapidForm/")]
    public interface IRoleService
    {
        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        bool Role_Add(Role Role);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        bool Role_Delete(string keyid);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        bool Role_BulkDelete(string keyids);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        bool Role_Update(Role Role);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        List<Role> Role_FilteredGetAll(String filterConditions);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        Role Role_GetByKeyid(string keyid);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        List<Role> Role_GetByUserKeyid(string userKeyid);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        List<Role> Role_GetUnmappedByUserKeyid(string userKeyid);

        /// <summary>
        /// 清除所有角色
        /// </summary>
        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        bool Role_Clear();
    }
}
